import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/musicIndex',
    name: 'musicIndex',             
    component: () => import('../views/music/musicIndex.vue'),
    meta: {
      isNav: true
    }
  },
  {
    path: '/musicMore/:m',
    name: 'musicMore',
    component: () => import('../views/music/more.vue'),
  },
  {
    path: '/musicSearch',
    name: 'musicSearch',
    component: () => import('../views/music/search.vue'),
  },
  {
    path: '/musicPlay',
    name: 'musicPlay',
    component: () => import('../views/music/play.vue'),
  },
  {
    path: '/musicDetail/:id',
    name: 'musicDetail',
    component: () => import('../views/music/detail.vue'),
  },
  {
    path: '/movieIndex',
    name: 'movieIndex',
    component: () => import('../views/movie/movieIndex.vue'),
    meta: {
      isNav: true
    }
  },
  {
    path: '/movieSearch',
    name: 'movieSearch',
    component: () => import('../views/movie/search.vue'),
  },
  {
    path: '/movieDetail/:id',
    name: 'movieDetail',
    component: () => import('../views/movie/detail.vue'),
  },
  {
    path: '/movieMore/:m',
    name: 'movieMore',
    component: () => import('../views/movie/more.vue'),
  },
  {
    path: '/articleIndex',
    name: 'articleIndex',
    component: () => import('../views/article/articleIndex.vue'),
    meta: {
      isNav: true
    }
  },
  {
    path: '/articleDetail/:id',
    name: 'articleDetail',
    component: () => import('../views/article/detail.vue'),
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
